#include<stdio.h>
#include<string.h>
#include<unistd.h>

#define NUM 101

const char* lable = "|/-\\";
void process()
{
  char bar[NUM];
  memset(bar,'\0',sizeof(bar));
  int cnt = 0;
  while(cnt <= 100)
  {
    printf("[%c][%-100s][%d%]\r",lable[cnt%4],bar,cnt);
    bar[cnt++] = '#';
    usleep(20000);
  }
  printf("\n");
}
int main()
{
  process();
  return 0;
}
